package main

import "fmt"

type Call struct {
}

func (c Call) start() {

	fmt.Println("手机启动")
}
func (c Call) stop() {
	fmt.Println("手机关机")
}

type Camera struct {
}

func (c Camera) start() {
	fmt.Println("相机开机")
}
func (c Camera) stop() {
	fmt.Println("相机关机")
}

type USB interface {
	start()
	stop()
}

type computer struct {
}

func (c computer) begin(usb2 USB) {
	usb2.start()
	usb2.stop()
}
func main() {

	call := Call{}
	camera := Camera{}
	var u USB
	c := computer{}
	u = call
	c.begin(u)
	u = camera
	c.begin(u)
}
